FUNCTION FUNC_FOO : BOOL
  VAR_INPUT
    bIn : BOOL;
  END_VAR

  VAR_IN_OUT
    bInOut : BOOL;
  END_VAR

  VAR_OUTPUT
    bOut : BOOL;
  END_VAR

bOut := bIn;
bInOut := NOT bInOut;
FUNC_FOO := bIn;

END_FUNCTION
